package com.sunop.discussion.service;


import com.baomidou.mybatisplus.extension.service.IService;
import com.sunop.discussion.model.Discussion;
import com.sunop.discussion.model.DiscussionPageQueryDTO;
import com.sunop.discussion.model.DiscussionReplyDTO;
import com.sunop.discussion.model.DiscussionSendDTO;
import com.sunop.panticommon.entity.PageResult;
import com.sunop.panticommon.entity.Result;

/**
 * @since 2025-03-22
 */
public interface DiscussionService extends IService<Discussion> {

    Result sendComment(DiscussionSendDTO discussionSendDTO);

    PageResult pageQuery(DiscussionPageQueryDTO discussionPageQueryDTO);

    Result delById(Integer id);

    Result sendReply(DiscussionReplyDTO discussionSendDTO);

    PageResult replyPageQuery(DiscussionPageQueryDTO discussionPageQueryDTO, int cid);

    Result delReplyById(Integer id);

    Result discussionLike(Integer discussionId);

    Result discussionUnlike(Integer discussionId);

    Result collectDiscussion(Integer discussionId);

    Result uncollectDiscussion(Integer discussionId);

    Result getCollectedDiscussions(int page, int size, boolean reverseOrder);

    long getCollectedCount();

    boolean isDiscussionCollected(Integer discussionId);
}
